package com.luoc.service.impl;

import com.luoc.service.*;

/**
 * @Author: luoc
 * @Date: 2019/10/10 15:16
 */
public class ConcreteMediator extends Mediator {

    private Button button;

    private ComboBox comboBox;

    private List list;

    private TextBox box;

    @Override
    public void componentChange(Componet component) {

         if (component ==  button){
             comboBox.update();
             list.update();
             box.update();
         }
         else if (component == list){
             comboBox.update();
             button.update();
             box.update();
         }
         else if (component == comboBox ){
             list.update();
             button.update();
             box.update();
         }
    }

    public Button getButton() {
        return button;
    }

    public void setButton(Button button) {
        this.button = button;
    }

    public ComboBox getComboBox() {
        return comboBox;
    }

    public void setComboBox(ComboBox comboBox) {
        this.comboBox = comboBox;
    }

    public List getList() {
        return list;
    }

    public void setList(List list) {
        this.list = list;
    }

    public TextBox getBox() {
        return box;
    }

    public void setBox(TextBox box) {
        this.box = box;
    }
}
